import React, { Component } from 'react';
import {
    View,
    StyleSheet,
    RefreshControl,
    Dimensions,
    Platform,
} from 'react-native';
import {
    Container,
    Content,
    Left,
    Thumbnail,
    Text,
    Body,
    Icon,
    List,
    ListItem,
    Right,
    Switch,

} from 'native-base';

import STRING from '../../const_string_zh_CN';
import { NavigationActions } from 'react-navigation';
const { width, height } = Dimensions.get('window');
const marginTop = Platform.OS === 'ios' ? 20 : 0;
export default class discovery_interact_student extends Component {
     static navigationOptions = ({ navigation }) => ({
        title: navigation.state.params.title,
    });
    constructor(props) {
        super(props);
        //state内部维护的一个状态，我们刚开始进来的为空，来加载空的view
        this.state = {
            text: '上课',
           
        };
    }
    render() {
         const{navigate} =this.props.navigation;
        return (
          <Container style={StyleSheet.flatten(styles.Container)} >
            <Content refreshControl={<RefreshControl refreshing={false} />} scrollEnabled={true}>
              
                     <List >                   
                          <ListItem onPress={() => {navigate('QuestionStudent', { title: STRING.answer_now });}} style={StyleSheet.flatten(styles.ListItem)}>
                             <Icon name='ios-copy-outline' />
                                  <Body>
                                      <Text style={StyleSheet.flatten(styles.text_style)}>{STRING.answer_now}</Text>                                     
                                  </Body>
                                  <Thumbnail square size={20} style={StyleSheet.flatten(styles.nextIcon)} source={require('../../images/back.png')} />
                          </ListItem>
                          <ListItem onPress={() => {navigate('AnswerListBeforeStudent', { title: STRING.answer_list_before });}} style={StyleSheet.flatten(styles.ListItem)}>
                             <Icon name='ios-paper-outline'  />
                                  <Body>
                                      <Text style={StyleSheet.flatten(styles.text_style)}>{STRING.answer_list_before}</Text>                                     
                                  </Body>
                            <Thumbnail square size={20} style={StyleSheet.flatten(styles.nextIcon)} source={require('../../images/back.png')} />
                          </ListItem>
                     </List>
                           
            </Content>
            </Container>
        );
    }
}
const styles = StyleSheet.create({
    card_style: {
        backgroundColor:'white',  
    },
    text_style:{
      //fontFamily:'微软雅黑',
      fontSize:17,
      color:'#353535',
    },
     nextIcon: {
        width: 20,
        height: 20,
        marginRight: 20,  
        opacity:0.8,
    }, 
    Container : {
        marginTop: 12, 
       // backgroundColor:'white',   
    },
     ListItem : {
       marginRight: 0,
        marginLeft: 0,
        marginTop: 3,
        paddingBottom:10,
        paddingLeft:20,
        paddingRight:20,
        backgroundColor:'white',
   
       
    },
});
